<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiyue" uri="http://www.shiyue.com" %>
<%
String path = request.getContextPath();
%>

<!--  2010-07-05 按教师查询岗位安排  修改 2010-7-16 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title>按教师查询岗位安排</title>
	<link href="<%=path %>/css/index_css.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/paging.css">
    <script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
    <script language="javascript" src="<%=path %>/js/paging.js"></script>
	<script src="<%=path%>/dwr/engine.js"></script>
    <script src="<%=path%>/dwr/util.js"></script>
    <script src="<%=path%>/dwr/interface/shiyueDwr.js"></script>
	<script type="text/javascript">      
       function getAllYearCallBack(yearMap) {
        DWRUtil.addOptions("year", yearMap);
        if('${year}'!="")
    	{
    	  document.getElementById('year').value="${year}";
    	}else if('${currentYear}'!="")
    	{
    	  document.getElementById('year').value="${currentYear}";
    	}
    	var objURL="";
		objURL= "<%=path %>/findClassByTeacherGradeAndClassAction.action?year="+document.getElementById('year').value+"&currentPage=${currentPage}";		
		paging(objURL,pageInfo);
    } 
    
     function getAllSchoolTermCallBack(schoolTermMap) {
	    DWRUtil.addOptions("schoolTerm", schoolTermMap);
    }
    
    function tdClick(url)
    {
      window.location.href=url;
    }
    
    var pageInfo = ${shiyue:toJSONWithExclude(pageInfo, "class,pageData")};
	window.onload   =   function(){
		shiyueDwr.getAllYear(getAllYearCallBack);
    	resizeIframe();
		parent.location.hash="top";
	}
	
		//浮动表头 
    function floatTr(obj)  {
		var ftr = document.getElementById('ftr');
		ftr.style.top= obj.scrollTop; 
	}
    </script>

  </head>
  <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="left" class="f_5">岗位安排查询</td><!--  2011-03-31 任命状态查询 改 岗位安排查询 -->
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#9DD12E"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="bottom" background="<%=path%>/images/sywesp_24.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90" align="left"><table width="90" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1" align="left" valign="bottom" bgcolor="#CBCBCB"></td>
                <td align="center" background="<%=path%>/images/sywesp_25.gif" class="f_9">按教师查询</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="5" align="left">&nbsp;</td>
            <td width="130" align="left"><table width="130" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1" align="left" valign="bottom" bgcolor="#CBCBCB"></td>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/findTeacherByStaffRoomGradeAndClassAction.action?year=${currentYear}');" style="cursor:pointer;">按组织结构查询</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"><br></td>
              </tr>
            </table></td>
            <td width="5" align="left">&nbsp;</td>
            <td width="110" align="left"><table width="110" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1" align="left" valign="bottom" bgcolor="#CBCBCB"><br></td>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/roleToTeaGradeAndClassAction.action?year=${currentYear}');" style="cursor:pointer;">按角色查询</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"><br></td>
              </tr>
            </table></td>
            <td align="left">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="tb_8 border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="89%" align="left">
                 <form method="post" action="<%=path %>/findClassByTeacherGradeAndClassAction.action">
                    按年度查询：
                  <label>
                  <select name="year" id="year" onchange="tdClick('<%=path %>/findClassByTeacherGradeAndClassAction.action?year='+this.value);">
                  </select>
                  </label>
                  &nbsp;教师：
                  <input name="userName" id="UserName" type="text" size="10" value=""/>
                  &nbsp;
                  <input type="submit" value="查询" />
                  </form>
                  </td>
                <td width="11%" align="right" style="display: none;"><img src="<%=path%>/images/nv_hidden.gif" width="14" height="14" /> <a href="#">下载</a></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top">
            <div id='myDiv' style=" position:relative;width:100%;height:500px;overflow:auto;" onscroll="floatTr(this)">
             <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DCDCDC">
              <tr id='ftr' style='position:relative; top:0px;z-index:3'>
                <td width="12%" height="30" align="left" bgcolor="#DBE9F6" class="f_4">&nbsp;&nbsp;教师</td>
                <td align="left" bgcolor="#DBE9F6" class="f_4">&nbsp;&nbsp;班级(角色)</td>
                </tr>
              <c:forEach items="${requestScope.UserList}" var="user">
                <tr>
	                <td bgcolor="#FFFFFF" class="f_4"  height="30" nowrap="nowrap"> &nbsp;&nbsp;${user.name }</td>
	                <td align="left" bgcolor="#FFFFFF" valign="bottom"  height="30">
	                <c:forEach items="${requestScope.pcRelationList}" var="pcRelation">
	                    <c:if test="${pcRelation.id.user.userId eq user.userId}"><br/>
	                      <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" bgcolor="#FFFFFF" style="border-bottom:solid #DCDCDC 1px;" valign="top"  height="30">&nbsp;&nbsp;${pcRelation.id.classs.name }(${pcRelation.id.role.name })</td></tr></table>
	                    </c:if>
	                </c:forEach>
	                </td>
                </tr>
              </c:forEach>
            </table>
            </div>
            </td>
          </tr>
        </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" align="right"><shiyue:paging/></td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
  </body>
</html>
